<?php if($user->access!=0){ ?>

<div id="page_user">
<?php if (isset($info)){?>
	<p class="title"><?php print $info; ?></p>
<?php }else{?>
<div>
	<form action="index.php?page=user" method="post">
	<table>
	<caption>User settings</caption>
	<tr>
		<td colspan="2" class="title">Modification du password</td>
	</tr>
	<tr>
		<td>Old password</td>
		<td><input type="password" name="old_passwd" /></td>
	</tr>
	<tr>
		<td>New password</td>
		<td><input type="password" name="new_passwd1" /></td>
	</tr>
	<tr>
		<td>ReNew password</td>
		<td><input type="password" name="new_passwd2" /></td>
	</tr>
	<tr>
		<td colspan="2"><input type="submit" value="change" /></td>
	</tr>
	
	</table>
	</form>
</div>
<div id="loguser">
	<table>
	<caption>Log User</caption>
	<tr>
		<td class="title">Action</td>
		<td class="title">Date</td>
	</tr>
	<?php
	$sql_query=mysql_query("Select action,date from ".DATABASE_TABLE_LOG." WHERE user = '".mysql_escape_string($user->login)."' ORDER BY date DESC LIMIT 10");
	while ($query = mysql_fetch_array($sql_query) ){
	?>
		<tr>
			<td><?php print $query['action']?></td>
			<td><?php print date( "d/m/y à G\h i\m",$query['date']); ?></td>
		</tr>
	<?php 
	}
	?>
	</table>	
</div>
<?php } ?>
</div>
<?php } ?>